<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<h1>shisongyan</h1>
	</body>
	<script src="jquery-2.1.0.js"></script>
	<script>
		const data = [
			{
				title:"预测",
				children:[
					{
						title:"预测中心",
						children:[
							{
								title:"行情预测",
								children:[
									{title:"行情预测"}
								]
							}
						]
					}
				]
			},
			{
				title:"预测",
				children:[
					{
						title:"预测中心",
						children:[
							{title:"行情预测"}
						]
					}
				]
			},
			{
				title:"预测",
				children:[
					{
						title:"预测中心",
						children:[
							{title:"行情预测"}
						]
					}
				]
			},
			{
				title:"预测",
				children:[
					{
						title:"预测中心",
						children:[
							{title:"行情预测"}
						]
					}
				]
			}
		]
		let str = "";
		const draw = (data,n=0) => {
			
			for(let i=0;i<data.length;i++){
				str += `<li style=margin-left:${20*n}px>${data[i].title}</li>`;
				if(data[i].children){
					n++
					draw(data[i].children,n)
				}
			}
			
		}
		draw(data);
		$("body").append(str);
	</script>
</html>
